home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Freeware / Gobby 0.4.7 / gobby-0.4.7.exe / {app} / share / gtksourceview-2.0 / language-specs / ocl.lang < prev    next >
Extensible Markup Language  |  2008-09-09  |  5KB  |  139 lines

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3.  
  4.  OCL (Object Constraint Language) GtkSourceview language definition
  5.  based on GtkSourceview C language definition.
  6.  
  7.  Author: Mario Carri├│n <mario@monouml.org>
  8.  Copyright (C) 2007, Mario Carri├│n, <mario@monouml.org>
  9.  
  10.  This library is free software; you can redistribute it and/or
  11.  modify it under the terms of the GNU Library General Public
  12.  License as published by the Free Software Foundation; either
  13.  version 2 of the License, or (at your option) any later version.
  14.  
  15.  This library is distributed in the hope that it will be useful,
  16.  but WITHOUT ANY WARRANTY; without even the implied warranty of
  17.  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  18.  Library General Public License for more details.
  19.  
  20.  You should have received a copy of the GNU Library General Public
  21.  License along with this library; if not, write to the
  22.  Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  23.  Boston, MA 02111-1307, USA.
  24.  
  25. -->
  26.  
  27. <!--
  28.  To get more information about OCL see:
  29.  http://www.omg.org/technology/documents/formal/ocl.htm
  30. -->
  31.  
  32. <language id="ocl" _name="OCL" version="2.0" _section="Others">
  33.     <metadata>
  34.         <property name="mimetypes">text/x-ocl</property>
  35.         <property name="globs">*.ocl</property>
  36.         <property name="line-comment-start">--</property>
  37.     </metadata>
  38.  
  39.     <styles>
  40.         <style id="comment" _name="Comment" map-to="def:comment"/>
  41.         <style id="string" _name="String" map-to="def:string"/>
  42.         <style id="keyword" _name="Keyword" map-to="def:keyword"/>
  43.         <style id="operators" _name="Type Operators" map-to="def:keyword"/>
  44.         <style id="type" _name="Data Type" map-to="def:type"/>
  45.         <style id="operation" _name="Operation operator" map-to="def:keyword"/>
  46.     </styles>
  47.  
  48.     <definitions>
  49.         <context id="ocl">
  50.             <include>
  51.                 <!-- Comments -->
  52.                 <context id="comment" style-ref="comment" end-at-line-end="true">
  53.                      <start>--</start>
  54.                      <include>
  55.                          <context ref="def:in-line-comment"/>
  56.                      </include>
  57.                 </context>
  58.  
  59.                 <!-- Strings -->
  60.                 <context id="string" style-ref="string" end-at-line-end="true">
  61.                     <start>"</start>
  62.                     <end>"</end>
  63.                 </context>
  64.  
  65.                 <context ref="def:decimal"/>
  66.                 <context ref="def:float"/>
  67.  
  68.                 <!-- Keywords -->
  69.                 <context id="keywords" style-ref="keyword">
  70.                     <!-- 
  71.                     UML OCL2 Specification Page 29 and some other 
  72.                     that aren't "defined" as keywords 
  73.                     -->
  74.                     <keyword>and</keyword>
  75.                     <keyword>attr</keyword>
  76.                     <keyword>body</keyword>
  77.                     <keyword>context</keyword>
  78.                     <keyword>derive</keyword>
  79.                     <keyword>def</keyword>
  80.                     <keyword>endpackage</keyword>
  81.                     <keyword>false</keyword>
  82.                     <keyword>in</keyword>
  83.                     <keyword>init</keyword>
  84.                     <keyword>inv</keyword>
  85.                     <keyword>let</keyword>
  86.                     <keyword>oper</keyword>
  87.                     <keyword>package</keyword>
  88.                     <keyword>post</keyword>
  89.                     <keyword>pre</keyword>
  90.                     <keyword>self</keyword>
  91.                     <keyword>true</keyword>
  92.                 </context>
  93.  
  94.                 <!-- Operators used on all types -->
  95.                 <context id="operators" style-ref="operators">
  96.                     <keyword>abs</keyword>
  97.                     <keyword>and</keyword>
  98.                     <keyword>concat</keyword>
  99.                     <keyword>if</keyword>
  100.                     <keyword>implies</keyword>
  101.                     <keyword>else</keyword>
  102.                     <keyword>endif</keyword>
  103.                     <keyword>floor</keyword>
  104.                     <keyword>then</keyword>
  105.                     <keyword>or</keyword>
  106.                     <keyword>not</keyword>
  107.                     <keyword>size</keyword>
  108.                     <keyword>substring</keyword>
  109.                     <keyword>xor</keyword>
  110.                 </context>
  111.  
  112.                 <!-- Operations allowed on Collections -->
  113.                 <context id="operators-operations" style-ref="operation">
  114.                     <keyword>select</keyword>
  115.                     <keyword>exists</keyword>
  116.                     <keyword>forAll</keyword>
  117.                     <keyword>notEmpty</keyword>
  118.                     <keyword>reject</keyword>
  119.                 </context>
  120.  
  121.                 <!-- Default data types -->
  122.                 <context id="types" style-ref="type">
  123.                     <keyword>Boolean</keyword>
  124.                     <keyword>boolean</keyword>
  125.                     <keyword>Integer</keyword>
  126.                     <keyword>int</keyword>
  127.                     <keyword>Real</keyword>
  128.                     <keyword>real</keyword>
  129.                     <keyword>String</keyword>
  130.                     <keyword>string</keyword>
  131.                 </context>
  132.  
  133.             </include>
  134.         </context>
  135.     </definitions>
  136. </language>
  137.  
  138.  
  139.